Release 10.1A: OpenEdge Development:
Progress Dynamics Advanced Development


Client logic functions

Table 1–1 summarizes the functions and procedures that make up the client API. For complete information, see OpenEdge Development: ADM Reference .

Table 1–1: Client logic functions
Function
Description
assignFocusedWidget
Sets focus to the named object. Not supported for SmartDataFields and returns FALSE if attempted for SmartDataFields.
assignWidgetValue

Takes the name of one object and a character screen value as input and sets the SCREEN-VALUE of the object. The DataValue is set for a SmartDataField. (This would always be the key field for a lookup even where the display field is different.) This function sets DataModified to make the toolbar enable saving data (it behaves as if the user actually changed the field value manually). DataModified is set to TRUE whether or not the field is enabled.

assignWidgetValueList

Takes the name of one or more objects and character screen values and a delimiter as input and sets the SCREEN-VALUE of the objects. The DataValue is set for a SmartDataField (this would always be the key field for a lookup even where the display field is different).

This function sets the DataModified attribute to force the toolbar to enable saving data (it behaves as if the user actually changed the field value manually). The DataModified attribute is set to TRUE whether the field is enabled or not.

blankWidget

Blanks the SCREEN-VALUE of the objects in the namelist. The DataValue is blanked for a SmartDataField (this would always be the key field for a lookup even where the display field is different).

This function sets the DataModified attribute to force the toolbar to enable saving data (it behaves as if the user actually changed the field value manually).

This does nothing to objects that do not support SCREEN-VALUE and to objects where a blank screen value does not make sense, such as toggle boxes. It blanks a combo box by setting its list items to null.

clearWidget

Clears any value currently in the widget. Currently, if a save is attempted on a widget before a new value is provided, the widget will revert to its last saved value.

disableRadioButton

Disables the specified radio button of the radio set objects identified in the namelist. Returns FALSE if a widget in the list is not a radio set, if a widget in the list is not found, or if the button number is invalid.

disableWidget

Disables the objects identified in the namelist.

For SmartDataFields, it runs the disableField function. Note that disableField is not a generic SmartDataField function, therefore this API is only supported for SmartDataFields that have disableField defined. If a field in the list is not found or a SmartDataField without disableField is included in the list, disableWidget returns FALSE.

enableRadioButton

Enables the specified radio button of the radio set objects identified in the name list. Returns FALSE if a widget in the list is not a radio set, if a widget in the list is not found, or if the button number is invalid.

enableWidget

Enables the objects identified in the name list. For SmartDataFields, it runs the enableField function. Note that enableField is not a generic SmartDataField function, therefore this API is only supported for SmartDataFields that have enableField defined. If a field in the list is not found or a SmartDataField without enableField is included in the list, enableWidget returns FALSE.

formattedWidgetValue

Returns the SCREEN-VALUE of the object, or in the case of a browse column when in a ROW-DISPLAY trigger, the STRING-VALUE from the RowObject buffer field. The DataValue is returned for a SmartDataField (this would always be the key field for a lookup even where the display field is different). For example, you could use this function to get the formatted value of a single field to use for comparisons.

formattedWidgetValueList

Takes the name of one or more objects and returns the SCREEN-VALUE of the object or objects. For example, use this function to retrieve the formatted values of several fields to assign their screen values to other fields.

If the object is a browse column (called from within a ROW-DISPLAY trigger), the STRING-VALUE from the RowObject buffer field is added to the list of returned values.

If the object is a SmartDataField, the DataValue field is returned. The DataValue field is always the key field, even when the display field is different.

If a field in the list is not found or a field has an unknown value, the function returns “?” for its value in the returned character list.

hideWidget

Hides the objects identified in the namelist (and their pop-up buttons). For SmartDataFields, it invokes the hideObject method.

highlightWidget

Sets the background and foreground colors (FGCOLOR and BGCOLOR widget attributes) of the named objects to a standard highlight color, depending on the value of the highlightType argument. For example, you might want to change the background color of a field with an invalid value to red.

resetWidgetValue

Resets the SCREEN-VALUE of the objects identified in the name list back to its original value from its data source. If a field in the list is not found or there is no data source for a field in the list, FALSE is returned and it will process all others in the list.

toggleWidget

Reverses the value of one or more objects of type LOGICAL in the name list. The format of the widget is used to reverse its SCREEN-VALUE. For example, a logical with a format of credit/debit would change a “credit” screen-value to “debit,” A null value is not changed and FALSE is returned.

This function sets the DataModified attribute to force the toolbar to enable saving data (it behaves as if the user actually changed the field value manually).

viewWidget

Views the object or objects identified in the namelist (and their pop-up buttons). For SmartDataFields, it invokes the viewObject method.

widgetHandle

Returns the handle of the requested object. For a basic object it returns the WIDGET-HANDLE. For a SmartDataField it returns the procedure handle.

widgetIsBlank
Returns TRUE if the widget is blank, otherwise FALSE. If the namelist contains more than one object, then the function returns TRUE if all of them are blank, otherwise FALSE.
widgetIsFocused

Returns TRUE if the widget has focus. This is not supported for SmartDataFields. This returns unknown if the field is not found or if the widget is a SmartDataField.

widgetIsModified

Returns TRUE if the MODIFIED attribute or its equivalent is set for the object, otherwise FALSE. If the name list contains more than one object, then the function returns TRUE if any of them have changed, otherwise FALSE. If any field in the name list is not found, unknown is returned.

For example, use this function to check if any of multiple values involved in a calculation or expression have been modified.

widgetsTrue

Returns TRUE if the value of a LOGICAL object is TRUE, otherwise FALSE. This function does not support SmartDataFields. This function returns unknown if the field is not found, if the value of the LOGICAL is unknown, if the widget is not a LOGICAL field, or if the widget is a SmartDataField. Contrast with the widgetValue function, which returns a CHARACTER value.

widgetLongCharValue

Returns the longchar value of a field. The widgetValue function cannot return longcar values.

widgetValue

For most objects, returns the INPUT-VALUE of the object.

For a browse column within a ROW-DISPLAY trigger, the function returns the BUFFER-VALUE from the RowObject buffer field. If INPUT-VALUE returns a 4GL error because the value is actually blank, widgetIsBlank will be invoked and blank will be returned. For SmartDataFields, which do not have a standard function for returning an unformatted value, this function does nothing and returns unknown.

widgetValueList

Takes the name of one or more objects and a delimiter and returns the INPUT-VALUE of the object. In the case of a browse column reference from within a ROW-DISPLAY event, it returns the BUFFER-VALUE from the RowObject buffer field. SmartDataFields do not have a standard function for returning an unformatted value, so this function does nothing for SmartDataFields and returns unknown.

If a field in the list is not found or a field has an unknown value, the function returns “?” for its value in the returned character list.


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095